<div id="pagepro" class="w920">
	<form action="" id="searchform" method="get">
				<p>
					<input type="text" id="searched_content" class="box" name="keyword" />
					<input type="submit" class="button" value="Search" />
				</p>
			</form>
</div>
<script type="text/javascript">
<!--
function toggleCategory(id) {
	idString = 'subCategory' + id;
	$('#'+idString).toggle();
}
//-->
</script>
<div id="content" class="w920" style="border-top:0;">
	<div class="conleft" style="border-right:1px solid #bcbec0;padding-right:0;width:720px;">
		<div class="pinlist">
			<div class="menu">
				<ul>
					<li><a href="/artwork">All</a></li>
					<?php foreach ($this->categories as $category) {?>
					<li><a href="/artwork?catId=<?=$category['self']->id?>&currency=<?=$this->currency?>&artist=<?=$this->artist?>&keyword=<?=$this->keyword?>"><?=$category['self']->name?></a>
						<ul id="subCategory<?=$category['self']->id?>" >
							<?php
							$childs = $category['childs'];
							foreach ($childs as $subCategory) {
								if ($this->currentCategory instanceof Model_ArtworkCategory && $this->currentCategory->id == $subCategory->id) {
									$style = 'font-weight:bold;color:#ccc;';
								} else {
									$style = '';
								}
								?>
								<li><a href="/artwork?catId=<?=$this->catId?>&category=<?php echo $subCategory->id;?>&currency=<?=$this->currency?>&artist=<?=$this->artist?>&keyword=<?=$this->keyword?>" style="<?php echo $style;?>"><?=$subCategory->name?></a></li>
							<?php } // end of foreach $childs?>
						</ul>
					</li>
					<?php } // end of foreach $this->categories?>
				</ul>
			</div>
			<div class="prolist">
				<p class="ts">Currency:
				<a style="color:white;<?if ($this->currency=='USD'){?>font-weight:bold;<?}?>" href="/artwork?category=<?php echo $this->currentCategory->id?>&page=<?php echo $this->page;?>&currency=USD&artist=<?=$this->artist?>&keyword=<?=$this->keyword?>">USD</a>
				<a style="color:white;<?if ($this->currency=='EUR'){?>font-weight:bold;<?}?>" href="/artwork?category=<?php echo $this->currentCategory->id?>&page=<?php echo $this->page;?>&currency=EUR&artist=<?=$this->artist?>&keyword=<?=$this->keyword?>">EUR</a>
				<a style="color:white;<?if ($this->currency=='RMB'){?>font-weight:bold;<?}?>" href="/artwork?category=<?php echo $this->currentCategory->id?>&page=<?php echo $this->page;?>&currency=RMB&artist=<?=$this->artist?>&keyword=<?=$this->keyword?>">RMB</a>
				</p>
				<?php foreach ($this->artworks as $artwork) {?>
				<dl>
					<dt><a href="/artwork/show?id=<?=$artwork->id?>"><img src="<?=$artwork->getPhotoWebAccessablePath('70x70');?>" alt="<?=$this->escape($artwork->name)?>" /></a></dt>
					<dd>
						<ul>
							<li><b>Title:</b><a href="/artwork/show?id=<?=$artwork->id?>"><?=$this->escape($artwork->name)?></a></li>
							<li><b>Size:</b><?=$this->escape($artwork->inch_size  ." / ". $artwork->size)?></li>
							<li><b>Artist:</b><a href="/artists/show?id=<?=$artwork->artist?>"><?=$this->escape($this->artists[$artwork->artist])?></a></li>
							<li><b>Material:</b><?=$this->escape($this->categoriesMap[$artwork->category])?></li>
							<li><b>Price(<?=$this->currency?>):</b>
							<?php
							switch ($this->currency) {
								case 'USD':
									echo $artwork->usd_price;
									break;
								case 'EUR':
									echo $artwork->uro_price;
									break;
								case 'RMB':
									echo $artwork->rmb_price;
									break;
							}
							?></li>
						</ul>
					</dd>
				</dl>
				<?php }?>
				<ul class="page">
					<?=$this->pager?>
				</ul>
			</div>
		</div>
	</div>
	<?php echo $this->render('global/right_ad.phtml')?>
</div>
